$(function () {
    $("#page").load("/html/page.html");
});
layui.use("layer");
function findAll() {
    let data = {
        name: $("#studentName").val(),
        oldGroup: $("#oldGroup").val(),
        pageSize: $.trim($("#pageSize").val()),
        pageNum: $.trim($("#pageNum").val()),
    }
    let result = myAjax('/g/group/findRecord', "post", data)
    if (result.code === 200) {
        show(result.data.list);
        $("#pageCount").html(result.data.number);
    } else {
        layer.msg("查询失败");
    }
}
function show(data) {
    let html = "";
    for (let i = 0; i < data.length; i++) {
        if (data[i].oldGroup==null){
            data[i].oldGroup = "暂无数据";
        }
        if (data[i].newGroup==null){
            data[i].newGroup = "暂无数据";
        }
        html += '   <tr> ' +
            '  <td><input type="checkbox" name="isCheck" value="' + data[i].id + '">' + data[i].id + '</td>\n' +
            '        <td>' + data[i].name + '</td>\n' +
            '        <td>' + data[i].oldGroup + '</td>\n' +
            '        <td>' + data[i].newGroup + '</td>\n' +
            '        <td>' + data[i].transferTime + '</td>\n' +
            '    </tr>';
    }
    $("#findAll").html(html);
}